% File:     usecase.tex
% Author:   Ryan J. Bovorasmy
% Date:     2007-06-24
% Desc:     This template is used to add a use case to the srs.tex template.
% Rev:      [2007-06-24, Ryan J. Bovorasmy] First major revision.
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% INSTRUCTIONS:
%%
%% This document can be used to create a use case for use with the srs.tex
%% template.
%%
%% Certain sections (such as this one) are delimited with special comments.
%% These sections contain similar material, and should be treated as a group.
%%
%% Comments beginning with *** indicate that editing is necessary in that
%% area. Example:
%%
%% *** Section description. This section needs editing.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
%
% BEGIN COMMAND SECTION
% Do Not edit this section unless you know what you are doing.
%
\providecommand{\usecase}{~}
\providecommand{\usehistory}{~}
\providecommand{\uc}{UC\theusecase}
\providecommand{\actor}{~}
\providecommand{\system}{~}
\setcounter{flownumber}{0}
\providecommand{\flowcounter}{\addtocounter{flownumber}{1} \theflownumber}
%
% END COMMAND SECTION
%
%||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

%==============================================================================
%
% BEGIN VARIABLE SECTION
%
% *** Enter the name of the use case here:
%
\renewcommand{\usecase}{User Reaches the End of a Simulation}
%
% *** Enter the revision history here.
% The format of the history command is as follows:
%
% \history{NAME}{DATE}{BRIEF DESCRIPTION\\}
%
% Notice that a newline is REQUIRED after the description.
%
\renewcommand{\usehistory}%
{%
  \history{Ryan J. Bovorasmy}{2007-11-01}{Created this use case from 
  uc-view-simulation-results.tex, uc-save-simulation-data.tex, 
  and uc-print-results-of-simulation.tex. \\}
}%
%
% END VARIABLE SECTION
%
%==============================================================================
\addtocounter{usecase}{1}
\subsection{\uc{}: \usecase{}}

%------------------------------------------------------------------------------
% Do not edit this.
%
\paragraph{\uc{}: Revision History}~\\{}
\begin{table}[htbp]
  \begin{tabular}{|l|l|p{.4\textwidth}|}
    \usehistory
    \hline
  \end{tabular}
\end{table}

%------------------------------------------------------------------------------
% *** Enter a brief description.
%
\paragraph{\uc{}: Brief Description}
The user has reached the end of a simulation, and must decide how to proceed. 
The system will present the user with a results screen summarizing the simulation 
data, and the user may either print or save these results. After this, the user
may choose to start another simulation.

% %------------------------------------------------------------------------------
% % *** Image/model
% %
% % Uncomment this section if you would like to add an image of the use case
% % here.
% %
% \paragraph{\uc{}: Model}
% If graphics are being used, add an image of the use case here.

%------------------------------------------------------------------------------
% ** Create a list of actors.
%
\paragraph{\uc{}: Actors}
\begin{description}
  \item[User] The user of the ProtoVitae software.
  \item[\projectname{}] The \projectname{} software.
\end{description}

%------------------------------------------------------------------------------
% *** Pre-conditions.
%
\paragraph{\uc{}: Pre-Conditions}
\begin{description}
  \item[Simulation Ended] The simulation has finished, either 
  prematurely,\footnote{At the request of the user, before it was set up to end.}
  or naturally.\footnote{After the duration time runs out.}
\end{description}

%------------------------------------------------------------------------------
% *** Basic flow.
%
% First enter in the actor name and system name.
%
\renewcommand{\actor}{User}
\renewcommand{\system}{ProtoVitae}
\paragraph{\uc{}: Basic Flow}~\\{}~\\{}
\begin{tabular}{|c|p{.4\textwidth}|p{.4\textwidth}|}
  \hline
  \# & \actor{} & \system{} \\
  \hline
  %
  % *** Next, create the rows of the table.
  % Because only one person can be acting at a time, each row should contain
  % one space. Replace the other space with the action.
  %
  \flowcounter{} & ~ & The system asks the user if they would like to view the results of the simulation. \\
  \hline
  \flowcounter{} & The user informs the system that they would like to see the results. & ~ \\
  \hline
  \flowcounter{} & ~ & The system displays the results of the simulation to the user. \\
  \hline
  \flowcounter{} & ~ & The system asks the user if they would like to save the simulation data. \\
  \hline
  \flowcounter{} & The user indicates that they wish to save simulation data. & ~ \\
  \hline
  \flowcounter{} & ~ & The systems asks the user for a file location. \\
  \hline
  \flowcounter{} & The user selects a file location. & ~ \\
  \hline
  \flowcounter{} & ~ & The system prepares the simulation data. \\
  \hline
  \flowcounter{} & ~ & The system creates a file at the selected location containing the prepared simulation data. \\
  \hline
  \flowcounter{} & ~ & The system asks the user if they would like to print simulation data. \\
  \hline
  \flowcounter{} & The user indicates that they wish to print the results of the simulation. & ~ \\
  \hline
  \flowcounter{} & ~ & The system prepares the results for printing. \\
  \hline
  \flowcounter{} & ~ & The system prints the prepared results. \\
  \hline
  \flowcounter{} & ~ & The system asks the user if they would like to start a new simulation. \\
  \hline
\end{tabular}


%------------------------------------------------------------------------------
% *** Alternative flow.
%
\paragraph{\uc{}: Alternative Flows}
\begin{description}
  \item[User Does not Wish To View Results] In the event the user does not wish to see the simulation's final results, the system shall return to the main menu.
  \item[User Cancels File Selection] The user may cancel rather than select a file location for saving. When this occurs, the system shall not prepare or save the simulation data, but shall proceed with the rest of the flow.
  \item[User Cancels Print] The user may cancel rather than select a file location. When this occurs, the system shall not print the simulation data.
  \item[Print/Save Order] The order in which the user decides to print or save is unimportant.
\end{description}

%------------------------------------------------------------------------------
% *** Exception flow.
%
\paragraph{\uc{}: Exception Flows}
\begin{description}
  \item[Simulation Results Error] The system shall inform the user that there has been an error in the simulation's results and then shall return to the state it was in before this use case was initiated.
  \item[File Exists] If the selected file already exists, the user will be prompted to either overwrite the file, or cancel the save.
  \item[Printer Error] All of the actual printing is taken care of by the printer hardware and driver. As such, if there is an error with the printing system that prevents printing, the results shall not print and the system shall revert to the state it was in before the printing was initiated.
\end{description}

%------------------------------------------------------------------------------
% *** Post-conditions.
%
\paragraph{\uc{}: Post-Conditions}
\begin{description}
  \item[Simulation Results Displayed] The results of the simulation are displayed to the user, and the option to start a new simulation is present.
\end{description}

%------------------------------------------------------------------------------
% *** Enter any additional notes here.
%
%\paragraph{\uc{}: Additional Notes}
%Any additional notes.